﻿
@{
    ViewBag.Title = "ForensicExaminationRecord";
}
<style type="text/css">
    .return {
        width: 80px;
        position: fixed;
        right: 100px;
        top: 400px;
        z-index: 100;
    }

    form {
        background: white;
        padding-left: 7%;
        padding-right: 7%;
        padding-bottom: 2%;
        padding-top: 2%;
    }

    .table, .table > tbody > tr > td {
        border: 1px solid;
        font-size: 15px;
        vertical-align: middle;
    }

    textarea {
        resize: none;
    }

    .page_title {
        width: 100%;
        height: 55px;
        color: #000;
        font-size: 25px;
        line-height: 55px;
        text-align: center;
        font-weight: 700;
    }

    .table_number {
        color: #000;
        font-size: 18px;
    }

    .beijdz {
        width: 20px;
    }

    .jianchaqingkuang, .beizhu {
        height: 150px;
        overflow: auto;
    }

    .xia_none {
        width: 150px;
        border: none;
        border-bottom: 1px solid;
        outline: none;
    }

    .border_none {
        border: none;
        outline: none;
    }

    .CheckTheSituation, .Remarks {
        width: 100%;
        height: 150px;
        overflow: auto;
    }
</style>
<a class="btn btn-default return" href="javascript: history.go(-1);">返&nbsp;&nbsp;回</a>
<form action="/As/SubmitForensicExaminationRecord" method="post">
    <div class="page_title">法医临床学检查笔录 </div>
    <div class="table_number">
        表格编号：
        <span name="TableNumber">@ViewBag.TableNumber</span>
        <input name="TableNumber" type="hidden" value="@ViewBag.ShroffId" />
    </div>
    <table class="forensicExaminationRecord_table table">
        <tr>
            <td colspan="2" style="width:50px;"></td>
            <td colspan="4">
                @ViewBag.Client
            </td>
            <td style="width:120px;">检查时间</td>
            <td colspan="2">
                <input name="time" class="border_none" value="@ViewBag.Foren.Time" />
            </td>
        </tr>
        <tr>
            <td rowspan="2">
                <div class="beijdz" style="margin:auto;">被鉴定者</div>
            </td>
            <td style="width:100px;">姓名</td>
            <td style="width:140px;">@ViewBag.be_appraiser.username</td>
            <td>性别</td>
            <td style="width:70px;">@ViewBag.be_appraiser.sex</td>
            <td style="width:100px;">年龄</td>
            <td>@ViewBag.be_appraiser_age</td>
            <td style="width:100px;">籍贯</td>
            <td>@ViewBag.be_appraiser_nationality</td>
        </tr>
        <tr>
            <td>住址</td>
            <td colspan="3">@ViewBag.be_appraiser.present_readdress</td>
            <td>受伤史陈诉人</td>
            <td>
                <input class="border_none" name="injuryHistoryUser" value="@ViewBag.Foren.InjuryHistoryUser" />
            </td>
            <td>可靠程度</td>
            <td>
                <label>
                    <input type="radio" name="Reliability" value="可靠" @(ViewBag.Foren.Reliability == "可靠" ? "checked" : "") />&nbsp;可靠
                </label>
                <br />
                <label>
                    <input type="radio" name="Reliability" value="不可靠" @(ViewBag.Foren.Reliability == "不可靠" ? "checked" : "") />&nbsp;不可靠
                </label>
            </td>
        </tr>
        <tr>
            <td colspan="9">
                使用方法：
                <label>
                    <input type="radio" name="MethodOfUse" value="SF/Z JD013003--2011<<法医临床检验规范>>" data-name="a" @(ViewBag.Foren.MethodOfUse == "SF/Z JD013003--2011<<法医临床检验规范>>" ? "checked" : "") />SF/Z JD013003--2011<<法医临床检验规范>>
                </label>
                <br />
                <label>
                    <input type="radio" name="MethodOfUse" data-name="b" @(ViewBag.Foren.MethodOfUse == "SF/Z JD013003--2011<<法医临床检验规范>>" ? "" : "checked") />其他:<input class="xia_none" name="MethodOfUse2" id="MethodOfUse" value="@(ViewBag.Foren.MethodOfUse == "SF/Z JD013003--2011<<法医临床检验规范>>" ? "" : ViewBag.Foren.MethodOfUse)" />
                </label>
            </td>
        </tr>
        <tr>
            <td colspan="9">
                使用仪器：
                @{
                    string[] str = new string[] { "叩诊锤", "量角尺", "直尺", "皮尺", "照相机", "关片灯", "检查床", "其他" };
                    for (int i = 0; i < str.Length; i++)
                    {
                        bool b = false;
                        for (int j = 0; j < ViewBag.UseTheInstrument.Count; j++)
                        {
                            if (str[i] == ViewBag.UseTheInstrument[j])
                            {
                                b = true;
                                break;
                            }
                            else
                            {
                                b = false;
                            }
                        }
                        <label>
                            <input type="checkbox" name="UseTheInstrument" @(b ? "checked" : "") value="@str[i]" />@str[i]
                        </label>
                        <span>&nbsp;</span>
                    }
                    if ((ViewBag.UseTheInstrument as List<string>).Contains("其他"))
                    {
                        
                    }
                    <input id="use" class="xia_none" name="UseTheInstrument" value="@((ViewBag.UseTheInstrument as List<string>).Contains("其他")?ViewBag.UseTheInstrument[ViewBag.UseTheInstrument.Count - 1]:"")" />
                }
            </td>
        </tr>
        <tr>
            <td colspan="9">
                <div>检查情况：</div>
                <textarea name="CheckTheSituation" class="border_none CheckTheSituation">@ViewBag.Foren.CheckTheSituation</textarea>
            </td>
        </tr>
        <tr>
            <td colspan="9">
                既往病、伤史:<input class="xia_none" name="injuryHistory" value="@ViewBag.Foren.InjuryHistory" />
            </td>
        </tr>
        <tr>
            <td colspan="9">
                检查人：<input class="xia_none" name="checkUser" value="@ViewBag.Foren.CheckUser" />&nbsp;&nbsp;&nbsp;
                摄影人：<input class="xia_none" name="photographer" value="@ViewBag.Foren.Photographer" />&nbsp;&nbsp;&nbsp;
                被检人或在场人：<input class="xia_none" name="inspectedOrAttendees" value="@ViewBag.Foren.InspectedOrAttendees" />
            </td>
        </tr>
        <tr>
            <td colspan="9">
                <div>要求说明:</div>
                <div>1、本表应由法医师填写，检查人、摄影人、被检人或在场人均应在表格中签字。</div>
                <div>2、表中所列各项，应认真填写，同事附照片及单项检查报告单。</div>
            </td>
        </tr>
        <tr>
            <td colspan="9">
                <div>备注：</div>
                <textarea class="border_none Remarks" name="Remarks">@ViewBag.Foren.remarks</textarea>
            </td>
        </tr>
        <tr>
            <td colspan="9" class="text-center">
                <button type="submit" class="btn btn-block">下一步</button>
            </td>
        </tr>
    </table>
</form>
<script type="text/javascript">
    $('input[type=radio]').change(function () {
        if ($(this).data('name') == 'a') {
            $('#MethodOfUse').attr('readonly','readonly').val("");
        } else if ($(this).data('name') == 'b') {
            $('#MethodOfUse').attr("required", "required").removeAttr('readonly');
        }
    });
    $("input[value=其他]").change(function () {
        if ($(this).get(0).checked) {
            $('#use').removeAttr('readonly').attr("required", "required");
        } else {
            $('#use').attr('readonly', 'readonly').val("");
        }
    });
</script>
